import request from '@/utils/request'

// 获取文章分页查询数据
export function getArticleList() {
  return request({
    url: '/article/page',
    method: 'get'
  })
}

// 修改文章数据
export function updateArticleList(data) {
  return request({
    data: data,
    url: '/article/update/' + data.id,
    method: 'put'
  })
}

// 查询文章数据
export function queryArticleList(id) {
  return request({
    url: '/article/' + id,
    method: 'get'
  })
}

// 新增文章数据
export function addArticleList(data) {
  return request({
    data: data,
    url: '/article/add',
    method: 'post'
  })
}

// 删除文章数据
export function delArticleList(id) {
  return request({
    url: '/article/' + id,
    method: 'delete'
  })
}
